package com.ylc.jwtdemo.service;

import com.ylc.jwtdemo.dao.UsermeDao;
import com.ylc.jwtdemo.entity.Userme;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UsermeService {
    @Autowired
    private UsermeDao usermeDao;

    public List<Userme>  findUsermeByName(String usermeName) {
        return usermeDao.findUsermeByName(usermeName);
    }

    public List<Userme> queryPage(Integer startRows) {
        return usermeDao.queryPage(startRows);
    }

    public int getRowCount() {
        return usermeDao.getRowCount();
    }

    public Userme insertUserme(Userme userme) {
        usermeDao.insertUserme(userme);
        return userme;
    }

    public List<Userme> ListUserme(){
        return usermeDao.ListUserme();
    }

    public int Update(Userme userme){
        return usermeDao.Update(userme);
    }

    public int delete(int usermeId){
        return usermeDao.delete(usermeId);
    }

}
